package com.share.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.share.device.domain.Cabinet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CabinetMapper extends BaseMapper<Cabinet> {


    /**
     * 分页查询柜机
     * @param cabinet
     * @return
     */
    List<Cabinet> selectCabinetList(Cabinet cabinet);

    //搜索未使用柜机 状态为 0
    @Select("select * from cabinet where cabinet_no like concat('%',#{keyword},'%') and status = 0 ")
    List<Cabinet> selectNoUse(String keyword);
}
